{% init leader_binlog_seq = -1 %}
{% init follower_binlog_seq = -1 %}

<div class="list-item">
    <span>主节点服务器(<a href="{{leader_host}}">{{leader_host}}</a>)</span>
    <div class="float-right">
        <a class="btn btn-default config-btn" 
            data-title="设置主服务器"
            data-key="leader.host"
            data-default="{{leader_host}}">设置</a>
        <!-- <i class="fa fa-chevron-right"></i> -->
    </div>
</div>

<div class="list-item">
    <span>主服务器token</span>
    <div class="float-right">
        <a class="btn btn-default config-btn" 
            data-title="设置主服务器token"
            data-key="leader.token"
            data-default="{{leader_token}}">设置</a>
        <!-- <i class="fa fa-chevron-right"></i> -->
    </div>
</div>

<div class="list-item">
    <span>主节点文件索引数</span>
    <div class="float-right">
        <span>{{fs_index_count}}</span>
    </div>
</div>

<div class="list-item">
    <span>文件同步进度</span>
    <div class="float-right">
        <span>{{sync_process}}</span>
    </div>
</div>

<div class="list-item">
    <span>同步失败</span>
    <div class="float-right">
        <a href="/system/db_scan?prefix=fs_sync_index_failed&reverse=true">{{sync_failed_count}}</a>
    </div>
</div>

<div class="list-item">
    <span>binlog位点</span>
    <div class="float-right">
        <span>{{follower_binlog_seq}}/{{leader_binlog_seq}}</span>
    </div>
</div>

<div class="list-item">
    <span>重置当前位点</span>
    <div class="float-right">
        <a class="btn btn-default confirm-btn" 
            data-title="确认重置当前位点?"
            data-key="reset_offset">重置</a>
        <!-- <i class="fa fa-chevron-right"></i> -->
    </div>
</div>

{% if False %}
    <div class="list-item">
        <span>触发同步</span>
        <div class="float-right">
            <a class="btn btn-default confirm-btn" 
                data-title="确认同步一次?"
                data-key="trigger_sync">同步一次</a>
            <!-- <i class="fa fa-chevron-right"></i> -->
        </div>
    </div>
{% end %}